<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
<div class="box"></div>
</body>

</html>
<script>
    function ajax2(me, url, han) {
        var xhr = new XMLHttpRequest()
        xhr.open(me, url)
        xhr.onreadystatechange = function () {
            if (xhr.readyState == 4) {
                han(JSON.parse(xhr.responseText))
            }
        }
        xhr.send()
    }
    ajax2('get', './ajax1.json', function (data) {
        console.log(data.list);
        var str=data.list.map((item) => {
            return `<div>${item.neirong}</div>`
        }).join('')
document.querySelector('.box').innerHTML=str
    })
</script>